﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using PropertyManagement.Domain.Entity;
using FluentNHibernate.Mapping;


namespace PropertyManagement.Domain.Mapping.FluentHibernate
{
    public class CustomerMap : ClassMap<Customer>
    {
        public CustomerMap()
        {
            Id(x => x.Id).Column("ID").GeneratedBy.Assigned() ;
            Map(x => x.FirstName).Column("FIRST_NAME");
            Map(x => x.LastName).Column("LAST_NAME");
            Map(x => x.Email).Column("EMAIL");
            Map(x => x.MobilePhoneNo).Column("MOBILE_PHONE_NO");
            Map(x => x.OfficePhoneNo).Column("OFFICE_PHONE_NO");
            Map(x => x.Active).Column("ACTIVE");
            Map(x => x.HousePhoneNo).Column("HOME_PHONE_NO");
            Map(x => x.Rating).Column("RATING");
            Map(x => x.CreatedDate).Column("CREATED_DATETIME");
            Map(x => x.Password).Column("PASSWORD");
            Map(x => x.PasswordSoalt).Column("PASSWORD_SALT");
            Map(x => x.ReferenceNo).Column("REFERENCE_NO");
        }
    }
}
